package com.huawei.hianalytics.process;

import com.huawei.hianalytics.util.g;

public final class HiAnalyticsLogConfig$Builder {
    private int failedFileMaxSize = 5;
    private int fileMaxSize = 3;
    private String logImei = "";
    private boolean logIsEnableImei;
    private boolean logIsEnableSN;
    private boolean logIsEnableUdid;
    private String logSN = "";
    private String logServerUrl;
    private String logUdid = "";
    private String mcc;
    private int minLogLevel;
    private int throwableFlag = 0;
    private String[] throwableInfo = new String[0];

    public HiAnalyticsLogConfig$Builder(int i, String str, String str2) {
        this.minLogLevel = i;
        this.mcc = str;
        this.logServerUrl = str2;
    }

    public HiAnalyticsLogConfig build() {
        return new HiAnalyticsLogConfig(this, null);
    }

    public HiAnalyticsLogConfig$Builder setFailedFileMaxSize(int i) {
        this.failedFileMaxSize = i;
        return this;
    }

    public HiAnalyticsLogConfig$Builder setFileMaxSize(int i) {
        this.fileMaxSize = i;
        return this;
    }

    @Deprecated
    public HiAnalyticsLogConfig$Builder setLogEnableImei(boolean z) {
        this.logIsEnableImei = z;
        return this;
    }

    @Deprecated
    public HiAnalyticsLogConfig$Builder setLogEnableSN(boolean z) {
        this.logIsEnableSN = z;
        return this;
    }

    @Deprecated
    public HiAnalyticsLogConfig$Builder setLogEnableUdid(boolean z) {
        this.logIsEnableUdid = z;
        return this;
    }

    public HiAnalyticsLogConfig$Builder setLogImei(String str) {
        if (!g.a("logimei", str, 4096)) {
            str = "";
        }
        this.logImei = str;
        return this;
    }

    public HiAnalyticsLogConfig$Builder setLogSN(String str) {
        if (!g.a("logsn", str, 4096)) {
            str = "";
        }
        this.logSN = str;
        return this;
    }

    public HiAnalyticsLogConfig$Builder setLogUdid(String str) {
        if (!g.a("logudid", str, 4096)) {
            str = "";
        }
        this.logUdid = str;
        return this;
    }

    public HiAnalyticsLogConfig$Builder setThrowableInfo(int i, String[] strArr) {
        this.throwableFlag = i;
        if (strArr != null) {
            this.throwableInfo = (String[]) strArr.clone();
        } else {
            this.throwableInfo = new String[0];
        }
        return this;
    }
}
